package com.byxy.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "_user")
public class User implements Serializable {
	@Id
	@Column(name = "username", length = 50)
	private String username;
	@Column(name = "password", length = 50)
	private String password;
	@Column(name = "name", length = 50)
	private String name;
	@Column(name = "email", length = 50)
	private String email;
	@Column(name = "phone", length = 50)
	private String phone;
	@Column(name = "addr", length = 50)
	private String addr;
	@Column(name = "state")
	private Integer state;//״̬
	@Column(name = "code", length = 50)
	private String code;   
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public User() {
		super();
		// TODO Auto-generated constructor stub
	}
	public User(String username, String password, String name, String email, String phone, String addr,
			Integer state, String code) {
		super();
	
		this.username = username;
		this.password = password;
		this.name = name;
		this.email = email;
		this.phone = phone;
		this.addr = addr;
		this.state = state;
		this.code = code;
	}
	@Override
	public String toString() {
		return "User [username=" + username + ", password=" + password + ", name=" + name + ", email="
				+ email + ", phone=" + phone + ", addr=" + addr + "]";
	}
	public User(String username, String password, String name, String email, String phone, String addr) {
		super();
		this.username = username;
		this.password = password;
		this.name = name;
		this.email = email;
		this.phone = phone;
		this.addr = addr;
	}

}
